package com.six.vo;

import java.sql.Date;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * 业务单明细
 * 
 */
@Entity
@Table(name="WMS_T_BILL_DETAILS")
public class BillDetail {
	private int detailsID; //VARCHAR(16) 明细编号
	private String detailsGoodsName; //NVARCHAR2(60) 货物名称
	private int detailsEstiTotal; //INTEGER 大致总件数
	private int detailsGoodsNum; //INTEGER 入库/出库货物件数
	private double detailsGoodsSpec; //NUMBER(30,2) 货物规格(公斤/件)
	private int currentGoodsNum; //INTEGER 当前货物件数
	private Date detailsEditTime; //DATE 最后编辑时间
	private int detailsIsDel; //SMALLINT 是否已被删除
	private Tray tray;
	private User detailsAffirmant;
	private User detailsConservator;
	private Bill bill;
	private Set<Movement> movement;
	
	public BillDetail() {
		super();
	}
	public BillDetail(int detailsID, String detailsGoodsName,
			int detailsEstiTotal, int detailsGoodsNum, double detailsGoodsSpec,
			int currentGoodsNum, Date detailsEditTime, int detailsIsDel,
			Tray tray, User detailsAffirmant, User detailsConservator,
			Bill bill, Set<Movement> movement) {
		super();
		this.detailsID = detailsID;
		this.detailsGoodsName = detailsGoodsName;
		this.detailsEstiTotal = detailsEstiTotal;
		this.detailsGoodsNum = detailsGoodsNum;
		this.detailsGoodsSpec = detailsGoodsSpec;
		this.currentGoodsNum = currentGoodsNum;
		this.detailsEditTime = detailsEditTime;
		this.detailsIsDel = detailsIsDel;
		this.tray = tray;
		this.detailsAffirmant = detailsAffirmant;
		this.detailsConservator = detailsConservator;
		this.bill = bill;
		this.movement = movement;
	}
	@Id
	@GeneratedValue
	public int getDetailsID() {
		return detailsID;
	}
	public void setDetailsID(int detailsID) {
		this.detailsID = detailsID;
	}
	public String getDetailsGoodsName() {
		return detailsGoodsName;
	}
	public void setDetailsGoodsName(String detailsGoodsName) {
		this.detailsGoodsName = detailsGoodsName;
	}
	public int getDetailsEstiTotal() {
		return detailsEstiTotal;
	}
	public void setDetailsEstiTotal(int detailsEstiTotal) {
		this.detailsEstiTotal = detailsEstiTotal;
	}
	public int getDetailsGoodsNum() {
		return detailsGoodsNum;
	}
	public void setDetailsGoodsNum(int detailsGoodsNum) {
		this.detailsGoodsNum = detailsGoodsNum;
	}
	public double getDetailsGoodsSpec() {
		return detailsGoodsSpec;
	}
	public void setDetailsGoodsSpec(double detailsGoodsSpec) {
		this.detailsGoodsSpec = detailsGoodsSpec;
	}
	public int getCurrentGoodsNum() {
		return currentGoodsNum;
	}
	public void setCurrentGoodsNum(int currentGoodsNum) {
		this.currentGoodsNum = currentGoodsNum;
	}
	public Date getDetailsEditTime() {
		return detailsEditTime;
	}
	public void setDetailsEditTime(Date detailsEditTime) {
		this.detailsEditTime = detailsEditTime;
	}
	public int getDetailsIsDel() {
		return detailsIsDel;
	}
	public void setDetailsIsDel(int detailsIsDel) {
		this.detailsIsDel = detailsIsDel;
	}
	@ManyToOne(cascade={CascadeType.ALL})           
    @JoinColumn(name="trayID") 	 //VARCHAR(16) 托盘系统编号
	public Tray getTray() {
		return tray;
	}
	public void setTray(Tray tray) {
		this.tray = tray;
	}
	@ManyToOne(cascade={CascadeType.ALL})           
    @JoinColumn(name="detailsAffirmant") 	 //VARCHAR(16) 验货员编号
	public User getDetailsAffirmant() {
		return detailsAffirmant;
	}
	public void setDetailsAffirmant(User detailsAffirmant) {
		this.detailsAffirmant = detailsAffirmant;
	}
	@ManyToOne(cascade={CascadeType.ALL})           
    @JoinColumn(name="detailsConservator") 	 //VARCHAR(16) 仓管员编号
	public User getDetailsConservator() {
		return detailsConservator;
	}
	public void setDetailsConservator(User detailsConservator) {
		this.detailsConservator = detailsConservator;
	}
	@ManyToOne(cascade={CascadeType.ALL})           
    @JoinColumn(name="billID") 	 //VARCHAR(16) 业务单系统编号
	public Bill getBill() {
		return bill;
	}
	public void setBill(Bill bill) {
		this.bill = bill;
	}
	@OneToMany(cascade=CascadeType.ALL)
	public Set<Movement> getMovement() {
		return movement;
	}
	public void setMovement(Set<Movement> movement) {
		this.movement = movement;
	}
	

}
